package com.cyzy.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 订单表，用于存储用户的订单信息
 * @TableName t_orders
 */
@TableName(value ="t_orders")
public class TOrders implements Serializable {
    /**
     * 订单ID，主键，自动递增  使用uuid
     */
    @TableId
    private String ordersId;

    /**
     * 用户ID，不能为空
     */
    private String userId;

    /**
     * 物流id
     */
    private String logisticsId;

    /**
     * 用户地址，不能为空
     */
    private String userAddress;

    /**
     * 订单总金额，带有两位小数
     */
    private BigDecimal totalAmount;

    /**
     * 订单支付方式: 0 钱包，1 微信支付 2.支付宝
     */
    private String paymentMethod;

    /**
     * 订单状态，0: 未支付，1: 已支付，2: 已发货，3: 已完成
     */
    private String ordersState;

    /**
     * 备注，用户填写的订单备注
     */
    private String notes;

    /**
     * 店铺id
     */
    private String storeId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 订单ID，主键，自动递增  使用uuid
     */
    public String getOrdersId() {
        return ordersId;
    }

    /**
     * 订单ID，主键，自动递增  使用uuid
     */
    public void setOrdersId(String ordersId) {
        this.ordersId = ordersId;
    }

    /**
     * 用户ID，不能为空
     */
    public String getUserId() {
        return userId;
    }

    /**
     * 用户ID，不能为空
     */
    public void setUserId(String userId) {
        this.userId = userId;
    }

    /**
     * 物流id
     */
    public String getLogisticsId() {
        return logisticsId;
    }

    /**
     * 物流id
     */
    public void setLogisticsId(String logisticsId) {
        this.logisticsId = logisticsId;
    }

    /**
     * 用户地址，不能为空
     */
    public String getUserAddress() {
        return userAddress;
    }

    /**
     * 用户地址，不能为空
     */
    public void setUserAddress(String userAddress) {
        this.userAddress = userAddress;
    }

    /**
     * 订单总金额，带有两位小数
     */
    public BigDecimal getTotalAmount() {
        return totalAmount;
    }

    /**
     * 订单总金额，带有两位小数
     */
    public void setTotalAmount(BigDecimal totalAmount) {
        this.totalAmount = totalAmount;
    }

    /**
     * 订单支付方式: 0 钱包，1 微信支付 2.支付宝
     */
    public String getPaymentMethod() {
        return paymentMethod;
    }

    /**
     * 订单支付方式: 0 钱包，1 微信支付 2.支付宝
     */
    public void setPaymentMethod(String paymentMethod) {
        this.paymentMethod = paymentMethod;
    }

    /**
     * 订单状态，0: 未支付，1: 已支付，2: 已发货，3: 已完成
     */
    public String getOrdersState() {
        return ordersState;
    }

    /**
     * 订单状态，0: 未支付，1: 已支付，2: 已发货，3: 已完成
     */
    public void setOrdersState(String ordersState) {
        this.ordersState = ordersState;
    }

    /**
     * 备注，用户填写的订单备注
     */
    public String getNotes() {
        return notes;
    }

    /**
     * 备注，用户填写的订单备注
     */
    public void setNotes(String notes) {
        this.notes = notes;
    }

    /**
     * 店铺id
     */
    public String getStoreId() {
        return storeId;
    }

    /**
     * 店铺id
     */
    public void setStoreId(String storeId) {
        this.storeId = storeId;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TOrders other = (TOrders) that;
        return (this.getOrdersId() == null ? other.getOrdersId() == null : this.getOrdersId().equals(other.getOrdersId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getLogisticsId() == null ? other.getLogisticsId() == null : this.getLogisticsId().equals(other.getLogisticsId()))
            && (this.getUserAddress() == null ? other.getUserAddress() == null : this.getUserAddress().equals(other.getUserAddress()))
            && (this.getTotalAmount() == null ? other.getTotalAmount() == null : this.getTotalAmount().equals(other.getTotalAmount()))
            && (this.getPaymentMethod() == null ? other.getPaymentMethod() == null : this.getPaymentMethod().equals(other.getPaymentMethod()))
            && (this.getOrdersState() == null ? other.getOrdersState() == null : this.getOrdersState().equals(other.getOrdersState()))
            && (this.getNotes() == null ? other.getNotes() == null : this.getNotes().equals(other.getNotes()))
            && (this.getStoreId() == null ? other.getStoreId() == null : this.getStoreId().equals(other.getStoreId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getOrdersId() == null) ? 0 : getOrdersId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getLogisticsId() == null) ? 0 : getLogisticsId().hashCode());
        result = prime * result + ((getUserAddress() == null) ? 0 : getUserAddress().hashCode());
        result = prime * result + ((getTotalAmount() == null) ? 0 : getTotalAmount().hashCode());
        result = prime * result + ((getPaymentMethod() == null) ? 0 : getPaymentMethod().hashCode());
        result = prime * result + ((getOrdersState() == null) ? 0 : getOrdersState().hashCode());
        result = prime * result + ((getNotes() == null) ? 0 : getNotes().hashCode());
        result = prime * result + ((getStoreId() == null) ? 0 : getStoreId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", ordersId=").append(ordersId);
        sb.append(", userId=").append(userId);
        sb.append(", logisticsId=").append(logisticsId);
        sb.append(", userAddress=").append(userAddress);
        sb.append(", totalAmount=").append(totalAmount);
        sb.append(", paymentMethod=").append(paymentMethod);
        sb.append(", ordersState=").append(ordersState);
        sb.append(", notes=").append(notes);
        sb.append(", storeId=").append(storeId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}